# topic /slam/state
int32 STATE_INACTIVE = 0
int32 STATE_SLAM = 1                # mapping & positioning
int32 STATE_POSITIONING = 2         # pure positioning

int32 state

# if current positioning is generally good.
# In slam mode, reliable is almost always true.
# In pure localization mode, reliable depends on the matches between trajectory 0 and 1.
bool reliable # TO BE DELETED

# Another method for evaluating position quality
# lidar reliable based on constraint only
int32 POSITION_QUALITY_NONE = 0
int32 POSITION_QUALITY_EXCELLENT = 10
int32 POSITION_QUALITY_GOOD = 8
int32 POSITION_QUALITY_POOR = 3
int32 POSITION_QUALITY_LOST = 1

int32 position_quality


# True means means ax_carto has detected position error (and a true position)
# and it's attempting to relocate the robot when the robot stops moving.
#
# So when planning_node gets this, it should pause current action and stop the robot as soon as possible.
# 如果 relocating 为 True 时，需要停车;
# 如果一直为 True，需要检查 /odom_origin/twist/twist/linear/x 字段是否为 0
# 依赖澳汀完善好 odom 的异常值的修改
bool relocating

# The lidar matching score evaluated by some model, such as beam model. Range [0,1]
float32 lidar_matching_score
